package com.citicup.backend.entity;

import javax.persistence.*;

@Entity
@Table(name = "fund_info", schema = "citicup2020", catalog = "")
public class FundInfo {
    private int id;
    private String fundCode;
    private String date;
    private String manager;
    private double fundScale;
    private String foundDate;
    private String fundName;
    private Integer managerYear;
    private Double xpRate;
    private Double yearInterestsRate;
    private Double yearFlucRate;
    private Double maxRetraceRate;
    private Double infoRate;
    private Double biaoZhunCha;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "fund_code")
    public String getFundCode() {
        return fundCode;
    }

    public void setFundCode(String fundCode) {
        this.fundCode = fundCode;
    }

    @Basic
    @Column(name = "date")
    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Basic
    @Column(name = "manager")
    public String getManager() {
        return manager;
    }

    public void setManager(String manager) {
        this.manager = manager;
    }

    @Basic
    @Column(name = "fund_scale")
    public double getFundScale() {
        return fundScale;
    }

    public void setFundScale(Double fundScale) {
        this.fundScale = fundScale;
    }

    public void setFundScale(double fundScale) {
        this.fundScale = fundScale;
    }

    @Basic
    @Column(name = "found_date")
    public String getFoundDate() {
        return foundDate;
    }

    public void setFoundDate(String foundDate) {
        this.foundDate = foundDate;
    }

    @Basic
    @Column(name = "fund_name")
    public String getFundName() {
        return fundName;
    }

    public void setFundName(String fundName) {
        this.fundName = fundName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FundInfo fundInfo = (FundInfo) o;

        if (id != fundInfo.id) return false;
        if (Double.compare(fundInfo.fundScale, fundScale) != 0) return false;
        if (fundCode != null ? !fundCode.equals(fundInfo.fundCode) : fundInfo.fundCode != null) return false;
        if (date != null ? !date.equals(fundInfo.date) : fundInfo.date != null) return false;
        if (manager != null ? !manager.equals(fundInfo.manager) : fundInfo.manager != null) return false;
        if (foundDate != null ? !foundDate.equals(fundInfo.foundDate) : fundInfo.foundDate != null) return false;
        if (fundName != null ? !fundName.equals(fundInfo.fundName) : fundInfo.fundName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result;
        long temp;
        result = id;
        result = 31 * result + (fundCode != null ? fundCode.hashCode() : 0);
        result = 31 * result + (date != null ? date.hashCode() : 0);
        result = 31 * result + (manager != null ? manager.hashCode() : 0);
        temp = Double.doubleToLongBits(fundScale);
        result = 31 * result + (int) (temp ^ (temp >>> 32));
        result = 31 * result + (foundDate != null ? foundDate.hashCode() : 0);
        result = 31 * result + (fundName != null ? fundName.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "manager_year")
    public Integer getManagerYear() {
        return managerYear;
    }

    public void setManagerYear(Integer managerYear) {
        this.managerYear = managerYear;
    }

    @Basic
    @Column(name = "xp_rate")
    public Double getXpRate() {
        return xpRate;
    }

    public void setXpRate(Double xpRate) {
        this.xpRate = xpRate;
    }

    @Basic
    @Column(name = "year_interests_rate")
    public Double getYearInterestsRate() {
        return yearInterestsRate;
    }

    public void setYearInterestsRate(Double yearInterestsRate) {
        this.yearInterestsRate = yearInterestsRate;
    }

    @Basic
    @Column(name = "year_fluc_rate")
    public Double getYearFlucRate() {
        return yearFlucRate;
    }

    public void setYearFlucRate(Double yearFlucRate) {
        this.yearFlucRate = yearFlucRate;
    }

    @Basic
    @Column(name = "max_retrace_rate")
    public Double getMaxRetraceRate() {
        return maxRetraceRate;
    }

    public void setMaxRetraceRate(Double maxRetraceRate) {
        this.maxRetraceRate = maxRetraceRate;
    }

    @Basic
    @Column(name = "info_rate")
    public Double getInfoRate() {
        return infoRate;
    }

    public void setInfoRate(Double infoRate) {
        this.infoRate = infoRate;
    }

    @Basic
    @Column(name = "biao_zhun_cha")
    public Double getBiaoZhunCha() {
        return biaoZhunCha;
    }

    public void setBiaoZhunCha(Double biaoZhunCha) {
        this.biaoZhunCha = biaoZhunCha;
    }
}
